<script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script>
<?php if(count($this->arrLoc) != 0) {?>
<script type="text/javascript">
/* Code based on Google Map APIv3 Tutorials */
var gmapdata;
var gmapmarker;
var infoWindow;

var def_zoomval = 15;
var def_longval = <?php echo $this->arrLoc[0]['longitude'];?>;
var def_latval = <?php echo $this->arrLoc[0]['latitude'];?>;

function initialize()
{
	
	// init for Map
	var curpoint = new google.maps.LatLng(def_latval,def_longval);

	gmapdata = new google.maps.Map(document.getElementById("mapitems"), {
		center: curpoint,
		zoom: def_zoomval,
		mapTypeId: 'roadmap'
		});

	gmapmarker = new google.maps.Marker({
					map: gmapdata,
					position: curpoint
				});	

	return false;
} // end of if_gmap_init
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<div class="map-frame" id="mapitems"
									style="display: block; width: 100%; height: 100%;">
								</div>
<?php }?>